﻿@{
    ViewBag.Title = "DangKyDeTa";
    Layout = "";
}

<h2>Đăng ký đề tài</h2>
<div >
    @{using(Ajax.BeginForm("DangKyDeTai","SinhVien",new AjaxOptions { 
              OnSuccess="DangKyThanhCong"
          })) { 
          <input type="hidden" id="madetaidk" name="madetaidk" value="" />
        <table>
            <tr>                
                <td>MSSV 1 (MSSV của bạn):</td>                
                <td><input type="text" id="massv1" name="mssv1" /></td>
            </tr>            
            <tr>
                <td>MSSV 2:</td>                                
                <td><input type="text" id="massv2" name="mssv2"/></td>
            </tr>
            <tr>
                <td><input type="submit" id="btnDangKyDeTai" style="display: none" /></td>
            </tr>
        </table>
    }}
</div>
@*<script>
    $(document).ready(function () {
        $('#btnDangKyDeTai').click(function () {
            var madetai = $("#madketaidk").val();
            var masv1 = $("#masv1").val();
            var masv2 = $("#masv2").val();
            $.post("/SinhVien/DangKyDeTai", { madetaidk: madetai, mssv1: massv1, mssv2: masv2 },
                function (data) {
                    alert(data.message);
                });
        });
    });
</script>*@
